import request from "@/utils/request";

// 首页数据接口
export const getHomeData = (params: any) => {
  return request({
    url: "/front-api/search/condition/23ze0YzeiuQ",
    method: "GET",
    data: {
      ...params,
    },
  });
};
//进入详情
export const getDetail = (params: any) => {
  return request({
    url: "/front-api/search/getDetail",
    method: "GET",
    data: {
      ...params,
    },
  });
};
//搜索接口
export const getSearch = (params: any) => {
  return request({
    url: "/front-api/search/context/23ze0YzeiuQ",
    method: "GET",
    data: {
      ...params,
    },
  });
};
//订单接口
export const getOrder = (data: any) => {
  return request({
    url: "/order-api/order/list",
    method: "POST",
    data,
  });
};
//收货地址
export const getAddress = (parasms: any) => {
  return request({
    url: "/setting-api/address/getMyAddressList",
    method: "GET",
    data: {
      ...parasms,
    },
  });
};
//更新收货地址
export const updateAddress = (data: any) => {
  return request({
    url: "/setting-api/address/updateAddress",
    method: "POST",
    data,
  });
};
//添加收货地址
export const addAddress = (data: any) => {
  return request({
    url: "/setting-api/address/addAddress",
    method: "POST",
    data,
  });
};
//删除收货地址
export const deleteAddr = (data: any) => {
  return request({
    url: "/setting-api/address/delAddress",
    method: "POST",
    data,
  });
};
